﻿using System;
using System.Data;
using System.Data.Common;
using Hxj.Data;
using Hxj.Data.Common;

namespace RecruitStudents.Utility.Model
{

	/// <summary>
	/// 实体类TB_SignUpStudentsPhoto 。(属性说明自动提取数据库字段的描述信息)
	/// </summary>
	[Serializable]
	public class TB_SignUpStudentsPhoto : Entity 
	{
        public TB_SignUpStudentsPhoto() : base("TB_SignUpStudentsPhoto") { _ID = Guid.NewGuid().ToString(); }

		#region Model
		private string _ID;
		private string _SignUpStudentsID;
		private string _PhotoName;
		private string _PhotoSize;
		private string _PhotoSuffix;
		private byte[] _Photo;
		/// <summary>
		/// 
		/// </summary>
		public string ID
		{
			get{ return _ID; }
			set
			{
				this.OnPropertyValueChange(_.ID,_ID,value);
				this._ID=value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string SignUpStudentsID
		{
			get{ return _SignUpStudentsID; }
			set
			{
				this.OnPropertyValueChange(_.SignUpStudentsID,_SignUpStudentsID,value);
				this._SignUpStudentsID=value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string PhotoName
		{
			get{ return _PhotoName; }
			set
			{
				this.OnPropertyValueChange(_.PhotoName,_PhotoName,value);
				this._PhotoName=value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string PhotoSize
		{
			get{ return _PhotoSize; }
			set
			{
				this.OnPropertyValueChange(_.PhotoSize,_PhotoSize,value);
				this._PhotoSize=value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string PhotoSuffix
		{
			get{ return _PhotoSuffix; }
			set
			{
				this.OnPropertyValueChange(_.PhotoSuffix,_PhotoSuffix,value);
				this._PhotoSuffix=value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public byte[] Photo
		{
			get{ return _Photo; }
			set
			{
				this.OnPropertyValueChange(_.Photo,_Photo,value);
				this._Photo=value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取实体中的主键列
		/// </summary>
		public override Field[] GetPrimaryKeyFields()
		{
			return new Field[] {
				_.ID};
		}
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.ID,
				_.SignUpStudentsID,
				_.PhotoName,
				_.PhotoSize,
				_.PhotoSuffix,
				_.Photo};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				this._ID,
				this._SignUpStudentsID,
				this._PhotoName,
				this._PhotoSize,
				this._PhotoSuffix,
				this._Photo};
		}
		/// <summary>
		/// 给当前实体赋值
		/// </summary>
		public override void SetPropertyValues(IDataReader reader)
		{
			this._ID = DataUtils.ConvertValue<string>(reader["ID"]);
			this._SignUpStudentsID = DataUtils.ConvertValue<string>(reader["SignUpStudentsID"]);
			this._PhotoName = DataUtils.ConvertValue<string>(reader["PhotoName"]);
			this._PhotoSize = DataUtils.ConvertValue<string>(reader["PhotoSize"]);
			this._PhotoSuffix = DataUtils.ConvertValue<string>(reader["PhotoSuffix"]);
			this._Photo = DataUtils.ConvertValue<byte[]>(reader["Photo"]);
		}
		/// <summary>
		/// 给当前实体赋值
		/// </summary>
		public override void SetPropertyValues(DataRow row)
		{
			this._ID = DataUtils.ConvertValue<string>(row["ID"]);
			this._SignUpStudentsID = DataUtils.ConvertValue<string>(row["SignUpStudentsID"]);
			this._PhotoName = DataUtils.ConvertValue<string>(row["PhotoName"]);
			this._PhotoSize = DataUtils.ConvertValue<string>(row["PhotoSize"]);
			this._PhotoSuffix = DataUtils.ConvertValue<string>(row["PhotoSuffix"]);
			this._Photo = DataUtils.ConvertValue<byte[]>(row["Photo"]);
		}
		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","TB_SignUpStudentsPhoto");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ID = new Field("ID","TB_SignUpStudentsPhoto","ID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field SignUpStudentsID = new Field("SignUpStudentsID","TB_SignUpStudentsPhoto","SignUpStudentsID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field PhotoName = new Field("PhotoName","TB_SignUpStudentsPhoto","PhotoName");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field PhotoSize = new Field("PhotoSize","TB_SignUpStudentsPhoto","PhotoSize");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field PhotoSuffix = new Field("PhotoSuffix","TB_SignUpStudentsPhoto","PhotoSuffix");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Photo = new Field("Photo","TB_SignUpStudentsPhoto","Photo");
		}
		#endregion


	}
}

